Repository navigation
Conversation
|
Open pull requests citing the same issues:
If one already covers this change, review or build on it instead of racing it (CONTRIBUTING.md "Overlapping work"). |
|
|
|
Fixed in commit 9cbe5db. Generation and floor now remain coupled: a newer generation wins as a whole, while floors are merged by high-water mark only within the same generation. Added regression coverage for a newer {floor: 0, gen: 9} recreate against an older {floor: 500, gen: 2}. Verification: 16 focused sequence-state tests passed, full suite 665 passed with 1 skipped, Ruff and format checks passed, and git diff --check passed. |
luch91
left a comment
There was a problem hiding this comment.
Reviewed exact head 9cbe5db. The migration now treats generation and floor as coupled lifecycle state: the higher generation wins as a whole, while equal-generation floors merge by non-negative high-water maximum. This preserves recreate semantics without allowing an older floor to leak into a newer lifecycle. The added regression reproduces the mixed-version case, and the existing suite covers first split, shard races, downgrade backup, idempotence, and pre-split reads. The PR reports 665 tests, Ruff, format, type, size, diff, and coverage checks passing; GitHub CI is green for full gates. No blocker found.
luch91
left a comment
There was a problem hiding this comment.
Reviewed exact head 9cbe5db2ac6eb447cb4bc339900d87f6cb9cb491. During mixed-version seq-state migration, the patch merges lifecycle entries by generation and keeps floor monotonic only within the same generation; a newer generation carries its own coupled floor instead of inheriting an older lifecycle’s floor. This preserves cursor and recreation semantics across legacy-map/shard races. The added regression test exercises a newer generation with a lower floor, and required runtime/MCP/OpenAPI/lint/test/image checks are green. Approved.
luch91
left a comment
There was a problem hiding this comment.
The exact implementation and regression remain source-level sound, but the approval on this head is no longer sufficient for the current repository state. GitHub reports PR #708 BEHIND; it targets 82d942936050f1ab0fb9f34db17893b89f3e064b, while current main is 45921c3e3699e01a55cde391674815367e0cff6b. Please rebase onto current main, resolve any sequence-state overlap, and rerun the full required gates on the rebased commit. The previous approval should not be read as verification of the current base.
|
Local revalidation of
The merge docstring also still describes independent maxima, whereas the implementation selects the newer generation as a whole and merges floors only within the same generation. The unmodified combined tree passes 783 tests; the small local follow-up with the additional cases passes 792, with one existing skip. Ruff, formatting, ty, and caps pass for the follow-up; coverage is 98.03%. Tested on macOS / Python 3.12.9, not Linux CI. The follow-up also passes all 138 official Chromium checks. I have a supplemental patch for this PR, not a competing PR. |
yukkie3276
left a comment
There was a problem hiding this comment.
One fail-closed migration edge remains in the new merge branch. If the shard already has a valid dict entry but the recovered legacy map has a non-dict value for the same room, if not isinstance(current, dict) or not isinstance(entry, dict): merged[room] = entry lets the malformed legacy value overwrite the valid shard state. _read_seq_state() only validates the outer object, so this case is reachable from a partially malformed legacy state; subsequent _seq_field() reads then fall back to zero and can regress both generation/floor despite a valid durable shard entry. Please preserve the valid dict when only one side is structurally valid (and add the symmetric regression cases); only the both-valid case should enter lifecycle merging.
|
@ShalyX, following up on my supplemental patch and @yukkie3276’s malformed-state review: ba19f64 builds on your lifecycle fix and contains the integrated change on current main
Linux verification explicitly checked out that clean commit: 911 tests passed, 1 existing skip, 98.08% coverage, 881 API-contract cases and all 138 official Chromium checks passed, plus lint/types/caps. Verified cherry-pick onto |
Current-main integration of japaneseml's PR flop-labs#311 lock-domain fix for flop-labs#302. Reuse the inode-validated locking primitive for sweeps, preserve shared/nonblocking semantics and explicit unlock, and recheck data under the acquired lock. Add kernel, multiprocess, CAS/sequence, cleanup/counting, and stateful regressions. Keep the immutable store cap at 1030 code lines with shared cleanup contexts. Place the stateful rule independently of the PR flop-labs#708 supplement; both patches apply cleanly in either order and produce the same combined tree.
9cbe5db to
d1c60f7
Compare
|
Morning catch-up rebuild onto current Tip: Invariant: mixed-version
Evidence
Not merge approval from CI yet — waiting on fresh checks for this tip. |
|
@ShalyX, thanks for rebuilding on current main. I rechecked One malformed-value case from the earlier review still reproduces: a valid shard I prepared f6032f6 directly on your new tip. It changes one production line to retain whichever side is a dict, preserving your lifecycle merge, and adds symmetric migration/cursor regressions plus a state-machine rule. Eight cases fail without the fix; all 52 focused/stateful tests pass with it. Local Applicable directly to |
luch91
left a comment
There was a problem hiding this comment.
The current head d1c60f7 is rebased onto current main and its reported CI is green, but the latest exact-head validation still reproduces a malformed migration case: a valid shard entry can be overwritten by a non-dict legacy value, regressing floor/generation to zero. The proposed supplemental fix f6032f6 is not part of this PR head. Please incorporate an equivalent guarded merge and regression tests, then rerun the full required gates.
Follow up on PR flop-labs#708 rebuilt at d1c60f7. Preserve the valid dict when only one migration entry is structurally valid, without changing lifecycle merging or cap usage. Add symmetric first/recovered migration regressions, append/cursor checks, and a lifecycle state-machine rule.
d1c60f7 to
497692b
Compare
|
Follow-up update on exact head 497692b, rebuilt from upstream/main 0e47f77. This incorporates the malformed-migration hardening from f6032f6:
Regression evidence:
The existing PR branch was force-updated; no duplicate PR was opened and no merge was performed. This is implementation and regression evidence, not merge approval. |
Follow up on PR flop-labs#708 rebuilt at d1c60f7. Preserve the valid dict when only one migration entry is structurally valid, without changing lifecycle merging or cap usage. Add symmetric first/recovered migration regressions, append/cursor checks, and a lifecycle state-machine rule.
497692b to
c9f665a
Compare
|
Rebuilt existing PR #708 onto current upstream/main 4a013e5 and force-pushed head c9f665a. Review follow-up included:
Verification on the exact pushed tree:
The first full run exposed one timing-sensitive stats test failure; the isolated test passed three consecutive reruns and the complete suite passed on the second run. This is implementation and regression evidence, not merge approval. |
|
Handling Two notes:
|
Merge legacy and shard .seqstate entries by generation lifecycle and floor high-water mark instead of picking one whole entry from file age. A post-split stale map can no longer rewind a shard recreate (gen+floor). Same-gen independent reaps keep the higher floor. Net-zero packing keeps store.py under the 1030 cap (1026/1030). Closes flop-labs#652.
Follow up on PR flop-labs#708 rebuilt at d1c60f7. Preserve the valid dict when only one migration entry is structurally valid, without changing lifecycle merging or cap usage. Add symmetric first/recovered migration regressions, append/cursor checks, and a lifecycle state-machine rule.
c9f665a to
d960702
Compare
|
Rebuilt existing PR #708 onto current upstream main and force-pushed the existing ShalyX branch (not merge approval). Provenance:
The rebuilt head preserves a structurally valid seq-state entry when the other side of a mixed-version migration is malformed, while retaining lifecycle-coupled generation/floor merging. It includes symmetric regressions and a stateful migration rule. Exact-head local evidence:
The branch tip and PR metadata were read back after the force-push. Hosted checks for this new head remain authoritative and must rerun. This is reproducible implementation evidence, not merge approval. |
|
Browser-gate follow-up for exact head d960702 (not merge approval). The hosted humans job failed at the delegation display late-error wait after earlier sections passed: Fresh isolated comparison against current upstream main 3cd868e:
This does not prove the hosted failure is infrastructure-related, but the hosted failure is not reproduced on either current base or exact head locally. The PR remains blocked until GitHub reruns or resolves the hosted browser gate. Local browser evidence is separate from hosted CI and is not merge approval. |
Summary
floorandgeninstead of selecting one whole entry.Why
During a rolling upgrade, an old worker can recreate/update
.seqstatewhile a new worker has already updated the room's shard. Selecting either complete entry can preserve one transition while regressing the other, causing cursor starvation or a stale conversation generation.Verification
mainat82d9429.uv run ruff check .uv run ruff format --check .uv run ty checkuv run coverage run -m pytest tests -q: 665 passed, 1 skippeduv run coverage report: 97.95% total coverageuv run python sz.py --capsgit diff --checkNo public API or new resource surface; no abuse-impact change. Does not modify changelog or protected size baseline.